/*
 * Copyright © 2017 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
*/

@tbody-font-color: #373a3c;
@tag-success-color: #5cb85c;
body.state-hydrator-create.state-hydrator {
  .modal.wrangler-modal {
    .modal-dialog {
      margin-top: 0;
      margin-bottom: 0;

      .dataprephome-wrapper {
        .dataprep-connections-container {
          .connections-content {
            .loading-svg-centered {
              top: 0;
            }
          }
          .top-panel {
            height: 50px;
            .title {
              > h5 {
                margin-top: 0;
                line-height: 50px;
              }
            }
          }
        }
      }
      dataprep .dataprep-container {
        .dataprep-loading {
          z-index: 1063;
        }
        .top-panel {
          .left-title {
            width: auto;
            margin-top: 5px;
            .workspace-tab {
              padding: 0 10px;
              cursor: pointer;
              .fa.fa-pencil {
                margin-left: 5px;
              }

            }
            .tag {
              display: inline-block;
              padding: 3px;
              font-weight: bold;
              line-height: 1;
              color: #ffffff;
              text-align: center;
              white-space: nowrap;
              border-radius: 4px;
              &.tag-success {
                background-color: @tag-success-color;
              }
            }
          }
          .action-buttons {
            min-width: auto;
            .secondary-actions {
              vertical-align: middle;
            }
          }
        }
        .dataprep-main {
          .dataprep-cli {
            .dataprep-auto-complete-container .result-row .directive-usage pre {
              background: transparent;
              border: 0;
            }
          }
        }
        .dataprep-table .table {
          thead th {
            font-size: 14px;
            padding: 0;

            input {
              padding: 0;
              width: auto;
              height: 20px;
            }
            &:last-child {
              border-right: 0;
            }
          }
          tbody {
            color: @tbody-font-color;

            tr {
              background-color: white;
            }
          }
        }
        #cut-directive {
          z-index: 1;
          .table.table-bordered {
            tr {
              background-color: transparent;
            }
          }
        }
        .dataprep-side-panel {
          .columns-tab {
            .columns-tab-heading {
              .dropdown {
                .btn.btn-secondary.active,
                .btn.btn-secondary:active,
                .btn.btn-secondary:focus,
                .btn.btn-secondary:hover {
                  box-shadow: none;
                }
              }
              .dropdown-item {
                display: block;
                width: 100%;
                padding: 3px 1.5rem;
                clear: both;
                font-weight: normal;
                color: #373a3c;
                text-align: inherit;
                white-space: nowrap;
                background: none;
                border: 0;
                font-size: 13px;
              }
            }
            .columns-list {
              table {
                thead {
                  th {
                    padding: 0.3rem;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  .workspace-management-modal {
    h4,
    h5,
    h6 {
      font-weight: 400;
      margin-top: 0;
    }
    h4 {
      font-size: 20px;
    }
    h5 {
      font-size: 16px;
    }
    h6 {
      font-size: 14px;
    }
  }
  .popover.column_actions_dropdown-element,
  .highlight-popover-element {
    display: block;
    z-index: 1060;
    min-width: initial;
  }
  .popover {
    &[class*="highlight-popover-out-of-bounds-"] {
      display: none;
    }
  }
  .dataprep-columns-action-dropdown {
    .action-item {
      font-size: 12px;
      font-weight: normal;
      .second-level-popover {
        font-size: 11px;
      }
    }
    hr {
      margin: 10px -10px;
    }
    .column-action-divider {
      hr {
        margin: 2px 0;
      }
    }
    h5 {
      font-size: 13px;
      margin-top: 0;
    }

    .action-buttons {
      min-width: auto;
    }
  }

  .dataprep-parse-modal {
    .dropdown-item {
      display: block;
      width: 100%;
      padding: 3px 1.5rem;
      clear: both;
      font-weight: 400;
      color: #373a3c;
      text-align: inherit;
      white-space: nowrap;
      background: none;
      border: 0;

      &:focus,
      &:hover {
        color: #2b2d2f;
        text-decoration: none;
        background-color: #f5f5f5;
      }
    }

    .dropdown-toggle:after {
      display: inline-block;
      width: 0;
      height: 0;
      margin-left: 0.3em;
      vertical-align: middle;
      content: "";
      border-top: 0.3em solid;
      border-right: 0.3em solid transparent;
      border-left: 0.3em solid transparent;
    }
  }
}
